/*
===============================向服务器请求数据====================================
大厅内部的
*/
HallEvent = {};

HallEvent.sendHeart = function(){
    if(G.netWork){
        G.netWork.sendClass(MDM_KN_COMMAND, SUB_KN_CLIENT_HEART);
    }
},

//登录游戏
HallEvent.login =function(data){
    console.log("=======login req===========");
    if(G.netWork){
        var cbData = gCByte.Str2Bytes(data);
        G.netWork.send(MDM_GP_LOGON, SUB_GP_LOGON_ACCOUNTS, cbData,cbData.length);
    }
},

//请求游戏列表
HallEvent.getGameLiset = function(targer){
    if(G.netWork){
        G.netWork.sendClass(MDM_GP_SERVER_LIST, SUB_GP_GET_LIST_RES);
    }
    // new CGPLoginMission(targer, MDM_GP_SERVER_LIST, SUB_GP_GET_LIST_RES,null);
}

//创建房间
HallEvent.createRoom = function(targer,data){
    if(G.netWork){
        var cbData = gCByte.Str2Bytes(data);
        G.netWork.send(MDM_GP_GET_SERVER, SUB_GP_CREATE_ROOM,cbData,cbData.length);
    }
    // new CGPLoginMission(targer,MDM_GP_GET_SERVER, SUB_GP_CREATE_ROOM ,data);
}
